#!/bin/sh
case "$1" in
  start|restart)
  rm -f /tmp/resolv.conf
  ln -s /tmp/resolv.conf.auto /tmp/resolv.conf
  ifup_interfaces=$(nvram get ifup_interfaces)
  ifup_interfaces=${ifup_interfaces:-"lan wan wifi"}
  for iface in $ifup_interfaces; do
  	ifup $iface
  	if [ "$iface" = "wifi" ]; then
		$iface up
	fi
  done
  ;;
esac
